﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using KvoMvc.BusinessEntity;
using KvoMvc.BusinessContract;
using KvoMvc.DataAccess;

namespace KvoMvc.BusinessComponent
{
    public class SchoolManager : ISchoolManager
    {
        public List<Person> GetPersonList()
        {
            return SchoolDataAccessor.GetPersonList();
        }

        public List<Department> GetDepartmentList()
        {
            return SchoolDataAccessor.GetDepartmentList();
        }

        public Person GetPersonById(int id)
        {
            return SchoolDataAccessor.GetPersonById(id);
        }

        public int CreatePerson(Person person)
        {
            return SchoolDataAccessor.CreatePerson(person);
        }

        public int UpdatePerson(Person person)
        {
            return SchoolDataAccessor.UpdatePerson(person);
        }
    }
}
